using KinonekoSoftware.CodariaDB.Documents.Templates;
using Microsoft.VisualBasic;

namespace KinonekoSoftware.CodariaDB.Documents.DataParts.Basics
{
    public sealed class Part_CustomBasic : Part_Basic, ICloneable<DataPart>
    {
        public DataPart Clone()
        {
            return new Part_CustomBasic
            {
                Id         = Id,
                DocumentID = DocumentID,
                Inlines    = new List<CompositeItem>(Inlines.Select(x => x.Clone())),
                Blocks     = new List<CompositeParagraph>(Blocks.Select(x => (CompositeParagraph)(x.Clone()))),
            };
        }

        public override DataPartType Type => DataPartType.Basic_Custom;
    }
}